$OpenBSD: patch-io_hpmud_musb_c,v 1.11 2016/10/27 08:35:26 ajacoutot Exp $

backwards memcpy

--- io/hpmud/musb.c.orig	Fri Oct 21 12:48:40 2016
+++ io/hpmud/musb.c	Thu Oct 27 10:27:48 2016
@@ -775,7 +775,7 @@ static int device_id(int fd, unsigned char *buffer, in
         len = size-1;   /* leave byte for zero termination */
     if (len > 2)
         len -= 2;
-    memcpy(buffer, buffer+2, len);    /* remove length */
+    memmove(buffer, buffer+2, len);    /* remove length */
     buffer[len]=0;
     DBG("read actual device_id successfully fd=%d len=%d\n", fd, len);
 
@@ -1262,7 +1262,7 @@ enum HPMUD_RESULT __attribute__ ((visibility ("hidden"
 
     if (*len)
     {
-        memcpy(buf, pd->id, *len > size ? size : *len);
+        memmove(buf, pd->id, *len > size ? size : *len);
         stat = HPMUD_R_OK;
     }
 
